[LIBXC] Add -Wmissing-prototypes to CFLAGS, fix warnings resulting from that.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 25 Oct 2006 14:25:13 +0000 (15:25 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 25 Oct 2006 14:25:13 +0000 (15:25 +0100)
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
tools/libxc/Makefile
tools/libxc/xc_linux_build.c
tools/libxc/xc_linux_restore.c
tools/libxc/xc_linux_save.c
tools/libxc/xc_private.c

index b5e61af64d7d8562957cf2546c475206a87d522b..129b867ff6783d5bdb6792b0e467c91795299363 100644 (file)
@@ -31,7 +31,7 @@ GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build.c
 
 -include $(XEN_TARGET_ARCH)/Makefile
 
-CFLAGS   += -Werror
+CFLAGS   += -Werror -Wmissing-prototypes
 CFLAGS   += -fno-strict-aliasing
 CFLAGS   += $(INCLUDES) -I.
 
index 822e55601b8b274fc7fdd7120046a0d5019a1691..e215d7e1981a42968299060573f0876795661b4f 100644 (file)
@@ -128,7 +128,7 @@ static int probeimageformat(const char *image,
     return 0;
 }
 
-int load_initrd(int xc_handle, domid_t dom,
+static int load_initrd(int xc_handle, domid_t dom,
                 struct initrd_info *initrd,
                 unsigned long physbase,
                 xen_pfn_t *phys_to_mach)
index 6e323340e31e71e92f29b1dc6f5d8d13f319ae1c..e4bd09ed19f334160b949ac8fb97c715849fb83a 100644 (file)
@@ -57,7 +57,7 @@ read_exact(int fd, void *buf, size_t count)
 ** This function inverts that operation, replacing the pfn values with
 ** the (now known) appropriate mfn values.
 */
-int uncanonicalize_pagetable(unsigned long type, void *page)
+static int uncanonicalize_pagetable(unsigned long type, void *page)
 {
     int i, pte_last;
     unsigned long pfn;
index d9550727265292b2a80d6b400802bc5bffa03e1f..7a5e4eaad6bd988d5d51dde538e947f08f158629 100644 (file)
@@ -413,7 +413,7 @@ static int suspend_and_state(int (*suspend)(int), int xc_handle, int io_fd,
 ** which entries do not require canonicalization (in particular, those
 ** entries which map the virtual address reserved for the hypervisor).
 */
-int canonicalize_pagetable(unsigned long type, unsigned long pfn,
+static int canonicalize_pagetable(unsigned long type, unsigned long pfn,
                            const void *spage, void *dpage)
 {
 
index aea9cd78d8a3039ed56f3d4bc15a40dc45361d8a..768cf5c5cfd32bea161057a1828a779e21668f23 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <inttypes.h>
 #include "xc_private.h"
+#include "xg_private.h"
 
 int lock_pages(void *addr, size_t len)
 {
@@ -35,23 +36,6 @@ int xc_get_pfn_type_batch(int xc_handle,
     return do_domctl(xc_handle, &domctl);
 }
 
-#define GETPFN_ERR (~0U)
-unsigned int get_pfn_type(int xc_handle,
-                          unsigned long mfn,
-                          uint32_t dom)
-{
-    DECLARE_DOMCTL;
-    domctl.cmd = XEN_DOMCTL_getpageframeinfo;
-    domctl.u.getpageframeinfo.gmfn   = mfn;
-    domctl.domain = (domid_t)dom;
-    if ( do_domctl(xc_handle, &domctl) < 0 )
-    {
-        PERROR("Unexpected failure when getting page frame info!");
-        return GETPFN_ERR;
-    }
-    return domctl.u.getpageframeinfo.type;
-}
-
 int xc_mmuext_op(
     int xc_handle,
     struct mmuext_op *op,